---
title: "reply with file · RUAL Documentation"
description: "reply to http connection with a file"
canonical: https://docs.rual.nl/block-types/http connection/httpconnection_set_file
language: en
---

# reply with file

This block is part of the [`files`](https://docs.rual.nl/block-types/files) group and was last modified in core [`v12.1.1`](https://docs.rual.nl/core-versions/120101).

reply to http connection with a file

- flow `flow`

- connection required `httpconnection`

- code required `number` HTTP Status Code to return on this response.

- Headers `array ` Custom HTTP Headers to set, Array of Objects [{ key: Value, value: Value }]

- file required `file` A blueprint file-type to be returned on this connection.

- flow `flow`

- connection `httpconnection`

A typical wiring for [reply with file](https://docs.rual.nl/block-types/files/httpconnection_set_file): [branch](https://docs.rual.nl/block-types/flow/branch) feeds the `flow` pin; [current request](https://docs.rual.nl/block-types/http%20connection/httpconnection_current_request) feeds the `connection` pin; [number](https://docs.rual.nl/block-types/number/number_default) feeds the `code` pin; [get file from assets](https://docs.rual.nl/block-types/files/file_from_assets) feeds the `file` pin; the `flow` out pin feeds [debug](https://docs.rual.nl/block-types/state%20ui/state_debug).

![Studio canvas example for the reply with file block: typical wiring for reply with file.](https://docs.rual.nl/canvas-examples/httpconnection_set_file.png)

### Commonly used with

In production blueprints, this block is most often wired together with:

- [branch](https://docs.rual.nl/block-types/flow/branch): feeds into this block.

- [current request](https://docs.rual.nl/block-types/http%20connection/httpconnection_current_request): feeds into this block. Retrieves a reference to the current HTTP Connection.

- [number](https://docs.rual.nl/block-types/number/number_default): feeds into this block. Generates a valid number from the filled custom value in the blueprint.

- [get fields](https://docs.rual.nl/block-types/object/object_field_getter_multiple): feeds into this block. Gets the selected fields from the given object.

### Version history

Introduced in [`v12.1.1`](https://docs.rual.nl/core-versions/120101).
